package com.njwb.day02;

public class HollowCircle {
    public static void main(String[] args) {
        int radius = 10; // 圆的半径，可以调整大小

        for (int y = -radius; y <= radius; y++) {
            for (int x = -radius; x <= radius; x++) {
                double distance = Math.sqrt(x * x + y * y);
                // 检查点是否在圆环范围内（考虑空心效果）
                if (Math.abs(distance - radius) < 0.5) {
                    System.out.print("* ");
                } else {
                    System.out.print("  ");
                }
            }
            System.out.println();
        }
    }
}